<!DOCTYPE html>
<!-- saved from url=(0027)http://www.hnjyxh.com/zcfg/ -->
<html>
<head lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <title>中国千商大会·博鳌酒业峰会</title>
    <meta name="keywords" content="湖南省酒业协会 酒协 湖南酒业">
    <meta name="description" content="湖南省酒业协会">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="__STATIC__/home/jquery_weui/css/weui.min.css"/>
    <link rel="stylesheet" href="__STATIC__/home/jquery_weui/css/jquery-weui.min.css"/>
    {css href="__PUBLIC__static/home/css/jquery.jcrop.min.css"}
</head>
<style>
    .weui-check1 {
        padding-left: .2rem;
        width: 1rem;
        height: 1rem;
        opacity: 0;
    }
    .login-checked:before {
        display: block;
        content: '\EA08';
        color: #fff;
        font-size: 12px;
        font-weight: bold;
        align-items: center;
        position: relative;
        top: 0.1rem;
        right: 0.05rem;
    }
    .login-radio {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
    }
    .login-radio .flex-row:first-child{
        margin-right: 30%;
    }
    .login-input {
        margin: 0 auto;
        border-radius: 1rem;
        background: #fff;
        opacity: .7;
        display: flex;
        flex-direction: row;
        font-size: .65rem;
        position: relative;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    .login-checked {
        background: #26c6da;
    }
    .login-radio .flex-row:nth-of-type(1) .weui-icon-checked4{
        left: 2rem;
    }
    .login-radio .flex-row:nth-of-type(2) .weui-icon-checked4{
        left: 3rem;
    }
    .weui-icon-checked4 {
        display: inline-block;
        width: .7rem;
        height: .7rem;
        border-radius: 50%;
        border: 1px solid #c0bfc4;
        vertical-align: middle;
        position: absolute;
        bottom: .03rem;
    }
    .weui-icon-checked4.login-checked{
        border: 1px solid #26c6da;
    }
    .login-radio .flex-row:first-child .weui-icon-checked{
        left: 2rem;
    }
    .login-radio .flex-row:last-child .weui-icon-checked{
        left: 3rem;
    }
    .mr10{
        margin-right: .6rem;
    }
    .weui-cell.noBorder:before{
        border: none;
    }
    .weui-cell.noBorder{
        padding: 0 15px 10px;
    }
    .login-radio{
        display: flex;
        flex-direction: row;
    }
    .flex-row {
        position: relative;
        align-items: center;
        vertical-align: middle;
    }
    .login-radio label {
        padding-right: .3rem;
    }
    .weui-check1 {
        padding-left: .2rem;
        width: 1rem;
        height: 1rem;
        opacity: 0;
    }
</style>
<body>
<form>
    <p style="text-align:center">
        <span style="font-size:1rem;font-weight: bold">中国千商大会博鳌酒业峰会邀请函</span>
    </p><br />
    <p style="text-align:center">
        <img src="/static/home/images/enlist.jpg" style="width: 100%; height: auto;">
    </p>
<div class="weui-cells weui-cells_form">
    <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" name="username" placeholder="请输入姓名">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label class="weui-label">性别</label>
        </div>
        <div class="weui-cell__bd">
            <div class="login-input">
                <div id='sex' class="weui-cell__bd login-radio">
                    <div class="flex-row">
                        <label for="s1">男</label>
                        <input id="s1" type="radio" name="sex" class="weui-check1 sex" value="1"/>
                        <span class="weui-icon-checked4 login-checked"></span>
                    </div>
                    <div class="flex-row">
                        <label for="s2">女</label>
                        <input id="s2" type="radio" name="sex" class="weui-check1 sex" value="0" />
                        <span class="weui-icon-checked4"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label class="weui-label">手机号</label>
        </div>
        <div class="weui-cell__bd">
            <input class="weui-input" type="text" name="mobile" placeholder="请输入手机号">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label class="weui-label">邮箱</label>
        </div>
        <div class="weui-cell__bd">
            <input class="weui-input" name="email" placeholder="请输入邮箱">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label class="weui-label">公司名</label>
        </div>
        <div class="weui-cell__bd">
            <input class="weui-input" name="company" placeholder="请输入公司名">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label class="weui-label">公司地址</label>
        </div>
        <div class="weui-cell__bd">
            <input class="weui-input" name="address" placeholder="请输入公司地址">
        </div>
    </div>
    <div class="weui-cell">
        <div class="weui-cell__hd">
            <label class="weui-label">备注</label>
        </div>
        <div class="weui-cell__bd">
            <input class="weui-input" name="remark" placeholder="请输入备注">
        </div>
    </div>
</div>

</form>
<div class="demos-content-padded" style="padding: 15px;">
    <a href="javascript:;" class="weui-btn weui-btn_primary send_form">提交</a>
</div>


<script src="__STATIC__/home/jquery_weui/js/jquery-2.1.4.js"></script>
<script src="__STATIC__/home/jquery_weui/js/jquery-weui.min.js"></script>
{js href="__PUBLIC__static/home/js/jquery.jcrop.min.js" /}
{js href="__PUBLIC__static/home/js/jquery.jcrop.upload.js" /}
{js href="__PUBLIC__static/home/js/exif.js" /}
<script>
    var SCOPE = {};
    SCOPE.upload_img_max_num = 3;
    SCOPE.upload_img_url = "/index/base/upload_image.html";

    $(function () {
        $(".login-radio").on("click",".flex-row",function(){
            $(this).siblings().children('input').removeAttr('checked').next().removeClass('login-checked');
            $(this).children('input').attr('checked','checked').next().addClass('login-checked');
            var sex = $(this).find('.sex').val();
        })


        $(".send_form").click(function () {
            var username = $('input[name="username"]').val();
            var sex=$('.weui-icon-checked4.login-checked').prev().val();
            var mobile = $('input[name="mobile"]').val();
            var email = $('input[name="email"]').val();
            var company = $('input[name="company"]').val();
            var address = $('input[name="address"]').val();
            var remark = $('input[name="remark"]').val();

            // 检查数据
            if (!$('input[name="username"]').val()) {
                $('input[name="username"]').focus();
                $.toptip('请输入您的姓名', 'error');
                return false;
            }
            if (!$('input[name="username"]').val().match(/^[\u4E00-\u9FA5]{2,4}$/)) {
                $('input[name="username"]').focus();
                $.toptip('姓名格式不正确', 'error');
                return false;
            }
            if (!$('input[name="mobile"]').val()) {
                $('input[name="mobile"]').focus();
                $.toptip('请输入您的手机号码', 'error');
                return false;
            }

            if (!$('input[name="mobile"]').val().match(/^0?(13|14|15|17|18)[0-9]{9}$/)) {
                $.toptip('手机号码格式不正确', 'error');
                $('input[name="mobile"]').focus();
                return false;
            }

            if (!$('input[name="email"]').val()) {
                $('input[name="email"]').focus();
                $.toptip('请输入您的邮箱', 'error');
                return false;
            }

            if (!$('input[name="email"]').val().match(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/)) {
                $.toptip('邮箱格式不正确', 'error');
                $('input[name="mobile"]').focus();
                return false;
            }

            if (!$('input[name="company"]').val()) {
                $('input[name="company"]').focus();
                $.toptip('请输入您的公司名', 'error');
                return false;
            }
            if (!$('input[name="address"]').val()) {
                $('input[name="address"]').focus();
                $.toptip('请输入您的公司地址', 'error');
                return false;
            }
            $.ajax({
                type : 'POST',
                url : '{:url("enlist")}',
                data : {username:username,sex:sex,mobile:mobile,email:email,company:company,address:address,remark:remark},
                dataType : 'json',
                success: function(info){
                    if(info.code == 200){
                        alert('提交成功！');
                        window.location.href = '{:url("enlist_pay")}?order_id=' + info.msg;
                    }else{
                        $.toptip(info.msg, 'error');
                    }
                }
            })
        });
    });
</script>
</body>
</html>